//
//  HLDisagnoseView.m
//  NewKY
//
//  Created by 罗浩林 on 16/11/14.
//  Copyright © 2016年 Dee. All rights reserved.
//

#import "HLDisagnoseView.h"
#import <SVProgressHUD.h>

@interface HLDisagnoseView ()

@property (weak, nonatomic) IBOutlet UIButton *leftRadioBtn;

@property (weak, nonatomic) IBOutlet UIButton *rightRadioBtn;

@end

@implementation HLDisagnoseView

-(void)awakeFromNib{
    
    [super awakeFromNib];
    
//    self.leftRadioBtn.selected =YES;
    
}

- (IBAction)clickLeftRadioBtn:(UIButton *)sender {
    
//    BOOL isSelectedBtn;
    
    if (sender == self.leftRadioBtn) {
        
        if (self.sickSelect == 0 ) {
            
            [SVProgressHUD setMinimumDismissTimeInterval:0.1];
            [SVProgressHUD showErrorWithStatus:@"未选择疾病类型"];
//            sender.userInteractionEnabled = NO;
            
        }else{
//            sender.userInteractionEnabled = YES;
            
            self.leftRadioBtn.selected = YES;
            self.rightRadioBtn.selected = NO;
            
        }
        
    }
    else{
        
        if (self.sickSelect == 0 ) {
            
            [SVProgressHUD setMinimumDismissTimeInterval:0.1];
            [SVProgressHUD showErrorWithStatus:@"未选择疾病类型"];
//            sender.userInteractionEnabled = NO;
            
        }else{
//            sender.userInteractionEnabled = YES;
            
            self.rightRadioBtn.selected = YES;
            self.leftRadioBtn.selected = NO;
            
        }
    }
    
    
//    self.leftRadioBtn.selected = !self.leftRadioBtn.isSelected;
    
}


@end
